package com.swz.dcrm.adpter;

import android.content.Context;

import com.swz.dcrm.R;
import com.swz.dcrm.base.ViewHolder;
import com.swz.dcrm.model.Group;

import java.util.List;

public class GroupAdapter extends CustomAdapter<Group> {
    public GroupAdapter(Context context,  List<Group> datas) {
        super(context, R.layout.item_group, datas);
    }

    @Override
    protected void convert(ViewHolder holder, Group group, int position) {
        holder.setText(R.id.tv_group_name,group.getName());
        holder.itemView.setOnClickListener(v -> {
            setCurrentClickPosition(position);
            if(onClickListener!=null){
                onClickListener.onItemClick(group);
            }
        });
    }
}
